#!/bin/bash
# Script to update and reload remotepc-host.service
echo "Stopping remotepc-host.service..."
systemctl stop remotepc-host.service
systemctl disable remotepc-host.service 1> /dev/null 2> /dev/null

echo "Switching service to GUI mode..."
sed -i 's/APP=remotepc-cli/APP=remotepc-host/' /etc/systemd/system/remotepc-host.service
echo "Reloading systemd daemon..."
systemctl daemon-reload

echo "Enabling remotepc-host.service..."
systemctl enable remotepc-host.service 1> /dev/null 2> /dev/null
systemctl start remotepc-host.service 1> /dev/null 2> /dev/null

echo "Reconfiguration complete."